package com.henry;

import com.henry.config.CORSInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by 峥桂 on 2017/5/16.
 */
// MyBatis 支持
//@MapperScan("com.henry.dao.mapper*")
@SpringBootApplication
//@ComponentScan("com.henry")
public class Application  extends WebMvcConfigurerAdapter {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        super.addInterceptors(registry);
        registry.addInterceptor(new CORSInterceptor()).addPathPatterns("/sycn/**");
    }

    public static void main(String[] args) throws Exception {
        SpringApplication.run(Application.class, args);
    }
}
